package com.tuocent.dagv2.constant;

import java.time.format.DateTimeFormatter;

/**
 * <p>
 * 常量定义
 * </p>
 *
 * @author Vincent
 * @since 2021-02-24
 */
public class PublicConst {
    public static final String APP_NAME = "档案数字化运营管理平台";
    public static final String TECH_SUPPORT = "技术支持：深圳市拓讯信息技术有限公司";
    public static final String EMAIL = "电子邮箱：work@tuocent.com";
    public static final String SERVICE_ONLINE = "";

    public static final String SERVER_NAME = "DagV2 Server ";
    public static final String PM_CHECK_CODE = "03b730ebe1673adbf69667185364fc24"; //TC-DagV2-

    //默认获取起始页数
    public static final int DEF_PAGE = 1;
    public static final String DEF_PAGE_S = "1";

    //默认每次共聚数据量
    public static final int DEF_LIMIT = 50;
    public static final String DEF_LIMIT_S = "50";

    //排除查询字段参数
    public static final String[] DEF_FIELD = {"page", "limit"};

    //最大导数数据行数
    public static final int InMaxRow = 50001;

    //支持批量挂接的文件格式
    public static final String[] DEF_MOUNT_FILE = {"jpg", "pdf", "tif", "doc", "docx", "xls", "xlsx", "htm", "html", "mp3", "mp4", "avi"};

    public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
    public static final String DEFAULT_DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
    public static final String DEFAULT_TIME_FORMAT = "HH:mm:ss";

    public static final int FONDS_COUNT = 20;

    public static final DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd");
    public static final DateTimeFormatter timeFormat = DateTimeFormatter.ofPattern("HH:mm:ss");
    public static final DateTimeFormatter dateTimeFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
    public static final DateTimeFormatter dateTimeFormatStr = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
    public static final DateTimeFormatter dateFormatStr = DateTimeFormatter.ofPattern("yyyyMMdd");
    public static final int MD5CheckSize = 10 * 1024 * 1024;

    public static final String HTTP = "http://";

    public static String EXCEL2003 = "xls";
    public static String EXCEL2007 = "xlsx";

    public static String getCurOfIdx(String idx) {
        switch (idx) {
            case "0":
                return "人民币";
            case "1":
                return "港币";
            case "2":
                return "澳币";
            case "3":
                return "美元";
            case "4":
                return "欧元";
        }
        return "人民币";
    }
}
